<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动</title>
    <style>
        .father{
            background-color: brown;
            /* height: 100px; */
            /* overflow: hidden; */
        }
        .father::after{
            content: "";
            display: table;
            clear: both;
        }
        .leftson{
            width: 50px;
            height: 50px;
            background-color: blue;
            float: left;
        }
        .rightson{
            width: 40px;
            height: 40px;
            background-color: bisque;
            float: right;
        }
    </style>
</head>
<body>
    <div class="father">父元素
        <div class="leftson">子元素1</div>
        <div class="leftson">子元素1</div>
        <div class="leftson">子元素1</div>
        <div class="leftson">子元素1</div>
        <div class="rightson">子元素2</div>
        <div class="rightson">子元素2</div>
        <div class="rightson">子元素2</div>
        <div class="rightson">子元素2</div>
    </div>
    <p>sdfsdsfsfsdf</p>


</body>
</html>